package com.letoken.platform.repo.utlis.lock;

import java.lang.annotation.*;
import java.util.concurrent.TimeUnit;

@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface Lock {

    LockCategoryEnum ce() default LockCategoryEnum.USER_ID;


    String field() default "";


    String desc() default "";

    // redis key
    // 自动拼接前缀 LOCK:${}
    String value() default "";

    long expire() default 10;

    TimeUnit unit() default TimeUnit.SECONDS;
}
